<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="SMW01" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" class="autoinput" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:80px;">
			<select name="sfield" class="combox">
			<option value="imei" {if $sfied == 'imei'} selected="selected" {/if}>串码</option>
				<option value="sn" {if $sfied == 'sn'} selected="selected" {/if}>订单编号</option>
				<option value="username" {if $sfield == 'username'} selected="selected" {/if}>用户名</option>
			</select>
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
			<div class="buttonActive"><div class="buttonContent"><button type="button" onclick="navTab.reload();">刷新 </button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div id="w_list_print">
	<table class="list" width="98%" targetType="navTab" layoutH="96">
		<thead>
			<tr>
				<th width="30">编号</th>
				<th width="30">用户</th>
				<th width="130">订单号</th>
				<th width="290" >产品</th>
				<th width="20" >串码</th>
				<th width="140" >下单时间</th>
				<th width="140">支付时间</th>
				<th width="140">发货时间</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}" >
				<td>{$vo['id']}</td>
				<td>{$vo['username']}</td>
				<td {if $vo['status'] == -10} style="text-decoration:line-through; " {/if}><a title="{$vo['sn']} 订单查看" target="dialog" width="800" height="650" rel="Order_detail_{$vo['order_id']}" href="{:U('Order/detail',array('id'=>$vo['order_id']))}">{$vo['sn']}</a></td>
				<!-- <td>{if $depot[$vo['id']]}<a href="{:U('Depot/index',array('oid'=>$vo['id']))}" target="navTab" rel="Order_depotdetail_{$depot[$vo['id']]['code']}" title="{$vo['id']}出库单">{$depot[$vo['id']]['code']}</a>{else}-{/if}</td> -->
				<td>{$vo['name']}</td>
				<td>{$vo['imei']}</td>
				<td>{if $vo['add_time']=='0'}-{else}{$vo['add_time']|date="Y-m-d H:i:s",###}{/if}</td>
				<td>{if $vo['pay_time']=='0'}-{else}{$vo['pay_time']|date="Y-m-d H:i:s",###}{/if}</td>
				<td>{if $vo['shipping_time']=='0'}-{else}{$vo['shipping_time']|date="Y-m-d H:i:s",###}{/if}</td>
				
			</tr>
</volist>
		</tbody>
	</table>
	</div>
<include file="Index:pages" />
</div>
<script>
function smw_print(){	  
	var ids =document.getElementsByName("b2bids[]");
	var oids="";
	for(var i=0;i<ids.length;i++){
         if(ids[i].checked){
        	 if(oids!=""){
        		 oids+=","+ids[i].value;
        	 }else{
        		 oids+=ids[i].value;
        	 }
     	 } 
    }      
	if(oids==""){
		alert("请选择一个订单");
	}else{
		window.open("index.php?m=Print&a=smw_print&ids="+oids);
	}
}
function smw_psdprint(){
	var ids =document.getElementsByName("b2bids[]");	
	var oids="";
	for(var i=0;i<ids.length;i++){
         if(ids[i].checked){
        	 if(oids!=""){
        		 oids+=","+ids[i].value;
        	 }else{
        		 oids+=ids[i].value;
        	 }
     	 } 
    }     
	if(oids==""){
		alert("请选择一个订单");
	}else{
		window.open("index.php?m=Print&a=smw_psdprint&ids="+oids);
	}
}
</script>